//
//  ChatListViewController.m
//  test2
//
//  Created by 贺银银 on 16/3/24.
//  Copyright © 2016年 hyy. All rights reserved.
//

#import "ChatListViewController.h"
#import "ChatRoomViewController.h"
#import "LoginViewController.h"
@interface ChatListViewController ()<CDChatListVCDelegate,UITextFieldDelegate>

@end

@implementation ChatListViewController

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.navigationController.tabBarController.tabBar.hidden = NO;
    
}
- (void)loadingView{
    
    
}

- (void)viewDidLoad {
    [super viewDidLoad];

//    LoginViewController *loginVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"login"];
//    [self.parentViewController.tabBarController presentViewController:loginVC animated:YES completion:nil];
    self.chatListDelegate = self;
    
    
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    
    [textField resignFirstResponder];
    return  YES;
}


- (void)viewController:(UIViewController *)viewController didSelectConv:(AVIMConversation *)conv
{
    ChatRoomViewController * chatRoom = [[ChatRoomViewController alloc]initWithConversation:conv];
    [self.navigationController pushViewController:chatRoom animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
